//
//  MuchScrollView.m
//  OpenYourEyes
//
//  Created by zhanglei on 15/8/13.
//  Copyright (c) 2015年 zhanglei. All rights reserved.
//

#import "MuchScrollView.h"
#import "Header.h"
#import "UIImage+WebP.h"
#import "MoviePlayerViewController.h"

@implementation MuchScrollView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        _scrollView = [[BTGlassScrollView alloc]initWithBackgroundImage:_image];

        _scrollView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT / 2);

        _scrollView.backgroundScrollView.contentOffset = CGPointMake(0, 0);
        
        [self addSubview:_scrollView];
        
    }
    return self;
}

- (void)setModel:(DailyModel *)model
{
    _model = model;
    [_scrollView.backgroundImageView sd_setImageWithURL:[NSURL URLWithString:_model.coverForDetail] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        _image = image;
    }];
}

//- (void)setIdx:(NSInteger)idx
//{
//    _idx = idx;
//}
//
//- (void)setSection:(NSArray *)section
//{
//    _section = section;
//}


@end
